<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
    <title>Modifier un Etudiant</title>
    <script type="text/javascript" language="javascript">
        function confirmDelete(){
            if (confirm("Voulez-vous supprimer l'&eacute;tudiant s&eacute;lectionn&eacute; ?"))
                return true;
            return false;
        }
    </script>
</h:head>
<h:body>
    <ui:include src="entete.xhtml"/>
    <h1>Modifier un Etudiant</h1>
    <hr/>
    <h:form>
        <p:panelGrid columns="2">
            <p:outputLabel value="Prenom : "/>
            <h:outputText value="#{etudiantController.selected.prenom}"/>

            <p:outputLabel value="Nom : "/>
            <h:outputText value="#{etudiantController.selected.nom}"/>

            <h:outputLabel value="Option : "/>
            <p:selectOneRadio id="option" value="#{etudiantController.selected.option}" required="true">
                <f:selectItem id="optNA" itemValue="NA" itemLabel="Sans option" />
                <f:selectItem id="optMira" itemValue="MIRA" itemLabel="MIRA" />
                <f:selectItem id="optSica" itemValue="SICA" itemLabel="SICA" />
                <f:selectItem id="optSise" itemValue="SISE" itemLabel="SISE" />
            </p:selectOneRadio>
        </p:panelGrid>
    <br/>
        <p:commandButton value="Enregistrer" action="#{etudiantController.doSave}"/>
    </h:form>
    <br/>
    <h:form>
        <p:commandButton value="Annuler" action="#{etudiantController.doCancelEdit}"/>
    </h:form>
    <hr/>
</h:body>
</html>
